array( 'caption' => 'Few weapons', 'shots' => array( 'ss16.png' => 'Burning trees', 'ss17.png' => 'More effective way of burning trees', 'ss18.png' => 'He won\'t shoot anymore', ), ), '2011-06-27' => array( 'caption' => 'Things that were done, but not shown', 'shots' => array( 'ss10.png' => 'Configure Menu', 'ss11.png' => 'Load - Save Menu', 'ss12.png' => 'Brief Menu', 'ss13.png' => 'Research Menu', 'ss14.png' => 'Map Menu', 'ss15.png' => 'Small progress in gameplay view', ), ), '2005-01-31' => array( 'caption' => 'Rendering a couple of FLI videos', 'shots' => array( 'ss4.png' => 'Intro video #1', 'ss5.png' => 'Intro video #2', 'ss6.png' => 'Intro video #3', 'ss7.png' => 'Lose game video', 'ss8.png' => 'Win game video', 'ss9.png' => 'Credits video', ), ), '2004-06-21' => array( 'caption' => 'An early demo of the map rendering', 'shots' => array( 'ss1.png' => 'This should be familiar :-)', 'ss2.png' => 'Just some random map', 'ss3.png' => 'Rendered with a different palette', ), ), ); // See if we need to show a screenshot $ss_date = isset($_GET['ss_date']) ? $_GET['ss_date'] : ''; $ss_file = isset($_GET['ss_file']) ? $_GET['ss_file'] : ''; $invalid = (empty($ss_date) || empty($ss_file) || empty($screenshots[$ss_date]) || empty($screenshots[$ss_date]['shots']) || !isset($screenshots[$ss_date]['shots'][$ss_file])); $title = ($invalid ? 'Screenshots' : "Screenshot ($ss_file)"); require_once 'include/common.php'; printHeader(); print "
\n"; if ($invalid) { // Show the list of all screenshots foreach ($screenshots as $date => $shotlist) { if (empty($shotlist['shots'])) { next; } $caption = !empty($shotlist['caption']) ? ' » ' . $shotlist['caption'] : ''; print "
$date$caption
\n"; print "\n"; $rowcount = 0; $endrow = false; foreach ($shotlist['shots'] as $file => $caption) { $thumb = "thumb.$file"; $thumb_img = "screenshots/$thumb"; $thumbnail = "images/$thumb_img"; $file_img = "screenshots/$file"; $filename = "images/$file_img"; if (!file_exists($filename) || !file_exists($thumbnail)) { next; } if ($endrow) { print "\n"; $endrow = false; } // We need the GD extension installed for this to work $thumb_size = getimagesize($thumbnail); $file_size = getFileSize($filename); $img = img($thumb_img, $thumb, $thumb_size[0], $thumb_size[1]); print "\n\n"; $rowcount++; if ($rowcount == 3) { $rowcount = 0; $endrow = true; } } print "
\n"; print "$img
\n"; print "$file ($file_size)

\n"; print "$caption

\n"; } } else { // View a single screenshot $shots = $screenshots[$ss_date]['shots']; $caption = !empty($shots[$ss_file]) ? ' » ' . $shots[$ss_file] : ''; print "
$ss_date$caption

\n"; $ss_url = "screenshots/$ss_file"; // We need the GD extension installed for this to work $ss_size = getimagesize("images/$ss_url"); echo '', img($ss_url, $ss_file, $ss_size[0], $ss_size[1]), "\n

\n"; print "
Click on the screenshot to return
\n"; } print "
\n"; printFooter(); ?>